package com.cy.spring5;

/**
 * 演示使用set方式进行注入属性
 */
public class Book {

    //创建属性
    private String bname;
    private String bauthor;
    private String address;

    public void setAddress(String address) {
        this.address = address;
    }

    //创建属性对应的set方法注入
    public void setBname(String bname) {
        this.bname = bname;
    }

    public void setBauthor(String bauthor) {
        this.bauthor = bauthor;
    }

    public void testDemo(){
        System.out.println(bname+"::"+bauthor+":"+address);
    }
}
